<?php
namespace App\Http\Controllers\Merchant; use App\Library\Response; use Illuminate\Http\Request; use App\Http\Controllers\Controller; use Illuminate\Support\Facades\Auth; class Log extends Controller { function get(Request $spe5a184) { $sp7aa9af = $spe5a184->input('user_id'); $sp1851d3 = $spe5a184->input('action', \App\Log::ACTION_LOGIN); $spa8a4ff = \App\Log::where('action', $sp1851d3); $spa8a4ff->where('user_id', Auth::id()); $sp705209 = $spe5a184->input('start_at'); if (strlen($sp705209)) { $spa8a4ff->where('created_at', '>=', $sp705209 . ' 00:00:00'); } $spe4a0d2 = $spe5a184->input('end_at'); if (strlen($spe4a0d2)) { $spa8a4ff->where('created_at', '<=', $spe4a0d2 . ' 23:59:59'); } $sp32b355 = (int) $spe5a184->input('current_page', 1); $sp048014 = (int) $spe5a184->input('per_page', 20); $spdf0cee = $spa8a4ff->orderBy('created_at', 'DESC')->paginate($sp048014, array('*'), 'page', $sp32b355); return Response::success($spdf0cee); } }